﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NewBee.Core.BusinessService
{

    public class Survey_FormBS : NewBee.Core.DataService.Survey_FormDS
    {
        /// <summary>
        /// 表是否存在
        /// </summary>
        /// <param name="TableName"></param>
        /// <returns></returns>
        public new bool TabExists()
        {
            return base.TabExists();
        }
        /// <summary>
        /// 判断是否存在某表的某个字段
        /// </summary>
        /// <param name="columnName">列名称</param>
        /// <returns>是否存在</returns>
        public new bool ColumnExists(string columnName)
        {
            return base.ColumnExists(columnName);
        }
        /// <summary>
        /// 根据分页条件，获取分页集合
        /// </summary>
        /// <param name="PageParam"></param>
        /// <returns></returns>
        public NewBee.Core.Data.Model.PageResult GetPageList(NewBee.Core.Data.Model.PageParam PageParam)
        {
            if (!string.IsNullOrEmpty(PageParam.search))
                PageParam.where = "Name Like '%" + PageParam.search + "%'";
            NewBee.Core.Data.Model.PageResult _PageResult = this.GetBasePageList(PageParam);
            return _PageResult;
        }

        /// <summary>
        /// 根据查询条件，获取实体集合
        /// </summary>
        /// <param name="QueryParam"></param>
        /// <returns></returns>
        public IEnumerable<Models.Survey_Form> GetQueryList(NewBee.Core.Data.Model.QueryParam QueryParam)
        {
            return this.GetBaseList<Models.Survey_Form>(QueryParam);
        }

        /// <summary>
        /// 根据ID获取实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Models.Survey_Form GetModelById(string id)
        {
            return base.GetByID(id);
        }

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public new bool Insert(Models.Survey_Form Survey_Form)
        {
            return base.Insert(Survey_Form);
        }

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public new bool Update(Models.Survey_Form Survey_Form)
        {

            return base.Update(Survey_Form);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public new bool Delete(string id)
        {
            return base.Delete(id);
        }

        /// <summary>
        /// 标记删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public new bool Remove(string id)
        {
            return base.Delete(id);
        }

    }
}